<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');
Yii::setPathOfAlias('bootstrap', dirname(__FILE__).'/../extensions/bootstrap');
// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'SCANNING',
    
    'theme'=>'bootstrap',
    
	// preloading 'log' component
	'preload'=>array('log', 'bootstrap'),
    
	// autoloading model and component classes
	'import'=>array(
		'application.models.*',
		'application.components.*',
	    'ext.bootstrap.*',
	    'application.helpers.*',
	),

	'modules'=>array(
		// uncomment the following to enable the Gii tool
		
		'gii'=>array(
			'class'=>'system.gii.GiiModule',
			'password'=>'123456',
			// If removed, Gii defaults to localhost only. Edit carefully to taste.
			//'ipFilters'=>array('127.0.0.1','::1'),
			'ipFilters'=>array('127.0.0.1', '218.30.116.*','221.220.250.207','::1'),
		    'generatorPaths' => array('bootstrap.gii')
		),
		
	),

	// application components
	'components'=>array(

		'user'=>array(
			// enable cookie-based authentication
			'allowAutoLogin'=>true,
		),
	    'db'=>array(
	        'class'=>'CDbConnection',
	        'connectionString'=>'mysql:host=115.159.74.155;port=3306;dbname=test',
	        'emulatPrepare'=>true,
	        'username'=>'lvniu',
	        'password'=>'654321',
	        'charset'=>'utf8',
	    ),

		// uncomment the following to enable URLs in path-format
		/*
		'urlManager'=>array(
			'urlFormat'=>'path',
			'rules'=>array(
				'<controller:\w+>/<id:\d+>'=>'<controller>/view',
				'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
				'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
			),
		),
		*/
	    
	    'image'=>array(
	        'class'=>'application.extensions.image.CImageComponent',
	        // GD or ImageMagick
	        'driver'=>'GD',
	        // ImageMagick setup path
	        'params'=>array('directory'=>'/opt/local/bin'),
	    ),
	    
		// database settings are configured in database.php
		'db'=>require(dirname(__FILE__).'/database.php'),

		'errorHandler'=>array(
			// use 'site/error' action to display errors
			'errorAction'=>'site/error',
		),
	    
	    'bootstrap' => array(
	        'class' => 'ext.bootstrap.components.Bootstrap',
	    ),
	    
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning',
				),
				// uncomment the following to show log messages on web pages
				/*
				array(
					'class'=>'CWebLogRoute',
				),
				*/
			),
		),

	),

	// application-level parameters that can be accessed
	// using Yii::app()->params['paramName']
	'params'=>array(
		// this is used in contact page
		'adminEmail'=>'webmaster@example.com',
	),
);
